package com.hshoesmall.demo.controller;


import com.hshoesmall.demo.common.api.ApiResult;
import com.hshoesmall.demo.mapper.ShoesTopMapper;
import com.hshoesmall.demo.model.entity.ShoesTop;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController //将数据渲染成json字符串
@RequestMapping( "/shoes" )
public class ShoesTopController {
    @Resource
    ShoesTopMapper shoesTopMapper;
    @PostMapping("/getManRange")
    public ApiResult<List<ShoesTop>> findManRange(){
         List<ShoesTop> manShoesTop = shoesTopMapper.findAllManShoes();
        return ApiResult.success(manShoesTop) ;
    }
    @PostMapping("/getFemaleRange")
    public  ApiResult<List<ShoesTop>> findFemale(){
        List<ShoesTop> femaleShoesTop = shoesTopMapper.findAllFemaleShoes();
        return ApiResult.success(femaleShoesTop) ;
    }
}
